class ExplainPromptPanle extends ChildPanle {
	public constructor(context:any) {
		super(context);
		 this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); 	
}

   protected onAddToStage() {
		new Bg(this,'mask_in_png');
		var percentage = 0.9;
		var imgCon = [];
		imgCon['url'] = '243_bg_png';
	    imgCon['width'] = this.stage.stageWidth * 0.8;
        imgCon['height'] = this.stage.stageHeight * percentage;
        imgCon['y'] = this.stage.stageHeight * 0.05;
        imgCon['x'] = this.stage.stageWidth * 0.1;
        this.addChild(new ImageBitmap(imgCon).getImgPoint());
        //增加关闭按钮
        this.setClose();
        super.onAddToStage();
    }

	    private setClose(): void {
        /**
         * 设置关闭按钮
         * @type {eui.Button}
         */
        var close_btn = new eui.Button();
        ///设置按钮的标签
        close_btn.skinName = "close_buttom";
        close_btn.width = 60;
        close_btn.height = close_btn.width;
        close_btn.x = this.stage.stageWidth * 0.855;
        close_btn.y = this.stage.stageHeight * 0.18;
        this.addChild(close_btn);
        close_btn.touchEnabled = true;
        close_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClose, this);
    }

	private onClose(evt:egret.TouchEvent){
		super.closeAm();
	}

}